/*
 * EtatRobot2.cpp
 *
 *  Created on: 27 nov. 2012
 *      Author: guegan
 */

#include "EtatRobot.h"
#include "AVide.h"
#include "AVideFaceObstacle.h"
#include "EnCharge.h"
#include "EnChargeFaceObstacle.h"

map<string, EtatRobot*> EtatRobot::mapEtat;
Robot* EtatRobot::robot = NULL;

EtatRobot::EtatRobot(string nom) : _nom(nom){
	mapEtat[nom] = this;
}

void EtatRobot::mapA(string s){
	mapEtat[s] = this;
}

EtatRobot* EtatRobot::getEtatInitial(){
	return mapEtat["AVide"];
}

void EtatRobot::creerEtats(){
	mapEtat["AVide"] = AVide::instance();
	mapEtat["AVideFaceObstacle"] = AVideFaceObstacle::instance();
	mapEtat["EnCharge"] = EnCharge::instance();
	mapEtat["EnChargeFaceObstacle"] = EnChargeFaceObstacle::instance();
	mapEtat["Fige"] = Fige::instance();
}

EtatRobot::~EtatRobot(){}
